
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>


<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="com.wgn.reportquery.utils.*"%>
<%@ page import="com.wgn.reportquery.service.*"%>


<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<meta name="description" content="">
<meta name="author" content="">

<title>数据汇总</title>
<script src="<%=basePath%>js/Chart.bundle.js"></script>
<script src="<%=basePath%>js/utils.js"></script>
<!-- Bootstrap core CSS -->
<link href="<%=basePath%>css/bootstrap.min.css" rel="stylesheet">

<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<link href="<%=basePath%>css/ie10-viewport-bug-workaround.css"
	rel="stylesheet">
<link href="<%=basePath%>css/justified-nav.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="<%=basePath%>css/signin.css" rel="stylesheet">

<!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
<!--[if lt IE 9]><script src="../../js/ie8-responsive-file-warning.js"></script><![endif]-->
<script type="text/javascript" src="<%=basePath%>/js/jquery.js"></script>
<script type="text/javascript" src="<%=basePath%>/js/jquery-ui.js"></script>
<script type="text/javascript"
	src="<%=basePath%>/js/bootstrap-dropdown.js"></script>

<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->


<link href="<%=basePath%>css/bootstrap.css" rel="stylesheet"
	type="text/css" />
</head>

<body>

	<div class="masthead">

		<nav>
			<ul class="nav nav-justified">
				<li class="active"><a href="<%=basePath%>SigninServlet">首页</a></li>
				<li><a href="<%=basePath%>jsp/signin.jsp">退出</a></li>
				<li><a href="<%=basePath%>jsp/regist.jsp">注册</a></li>
				<li><a href="http://www.shdc.org.cn/familyServices/index">上海市医院报告查询和门诊预约</a></li>
				<li><a href='<%=basePath%>jsp/downrj.jsp'>下载仁济app</a></li>
			</ul>
		</nav>
	</div>
	<div class="container">


		<div class="well">
			<p>用户:${username}</p>
		</div>
		<div class="row" >
			<div class="col-sm-4" style='width:98%'>

				<div class="panel panel-primary" >
					<div class="panel-heading">
						<h3 class="panel-title" >指标列表</h3>
					</div>
					<div class="panel-body" id='div_whole'>
					<button
							onclick="addRow()"
							class='btn btn-lg btn-success btn-block'>添加</button>
						<div id='div_left' style='width:32%;float: left; border: 1px solid blue'>
							<table class="table table-striped" id='t_l'>
								<!--  	<tr><td>x1x</td></tr>
					<tr><td>x1x</td></tr>
					<tr><td>x1x</td></tr>
					<tr><td>x1x</td></tr>
					<tr><td>x1x</td></tr>
					<tr><td>x1x</td></tr>
					<tr><td>x1x</td></tr>
					<tr><td>x1x</td></tr>
					<tr><td>x1x</td></tr>-->${timeline}
							</table>
						</div>
						<div id='div_right' style='width:68%;overflow-x: scroll; float: left'>
							<table class="table table-striped" id='t_r'>
								<!--  <tr><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td></tr>
					<tr><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td></tr>
					<tr><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td></tr>
					<tr><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td></tr>
					<tr><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td></tr>
					<tr><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td></tr>
					<tr><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td></tr>
					<tr><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td></tr>
					<tr><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td><td>xx</td></tr>
					-->${datatable}</table>
						</div>

					</div>
				</div>
			</div>


		</div>




	</div>




	<script src="<%=basePath%>js/common.js"></script>
	<script type="text/javascript">
	function addRow(){
		
		var newRow = "<tr><td>新行第一列</td></tr>";
		$("#t_l tr:gt(0):eq(0)").before(newRow);
		$("#t_r tr:gt(0):eq(0)").before(newRow);
	}
	function changeTrHeight(){
		var srcHeight=document.getElementById('yhead').clientHeight;
		document.getElementById('lefttable').style.height=srcHeight+'px';
	/*	alert(srcHeight);
		alert(tarHeight);*/
	}
	function changeDivWidth(){
		var srcWidth=document.getElementById('div_whole').offsetWidth;
		var leftWidth=document.getElementById('div_left').offsetWidth;
		
		//document.getElementById('lefttable').style.height=srcHeight+'px';
	//alert(srcWidth);
	//alert(leftWidth);
	document.getElementById('div_right').style.width=(srcWidth-leftWidth-35)+'px';
		/*	
	
		alert(tarHeight);*/
	}
	function querySingleReport() {
		 var father = document.getElementById("yhead");
		 var links=father.getElementsByTagName('td');
		    for (var i = 0; i < links.length; i++) {
		       links[i].onclick = t4;
		    }
		
	   

	}
	function t4(){
	    var querytypevalue=encodeURI($(this).html());//encodeURI
	 	
	    	
	    	window.location.href="<%=basePath%>dosomequery?querytype=chart&querytypevalue="
					+ querytypevalue;

		}
		addLoadEvent(changeTrHeight);
	//	addLoadEvent(changeDivWidth);
		addLoadEvent(querySingleReport);
	</script>
</body>
</html>
